package com.runfast.paotui.service;

import com.runfast.common.service.IService;
import com.runfast.common.web.entity.Result;
import com.runfast.paotui.dao.model.Order;
import com.runfast.paotui.dao.model.OrderExample;
import com.runfast.paotui.web.dto.OrderDto;
import org.springframework.data.domain.Pageable;

import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderService extends IService<Order, Integer, OrderExample> {
    List<Order> selectByMapWithPageable(Map<Object,Object> map);
    Integer countByMap(Map<Object,Object> map);
    Integer countJieDanOrPeiSongOrTotalByMap(Map<Object,Object> map);
    List<Order> selectJieDanAndPeiSongByMap(Map<Object,Object> map);
    List<Order> selectByMapDiaoDu(Map<Object,Object> map);

    Order findFromAndTo(Order order);


    Integer countByMapShouYe(Map<Object,Object> map);

    Result confirm(Order order);

    //Result take(Integer driverId, Integer orderId);

   // Result cancel(Integer userId, Integer orderId);

    List<Map<String, Integer>> selectIdUserIdByExample(OrderExample example);

    Result fillIn(Order order);

    OrderDto toOrderDto(Order order) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException;
    Map<Object, Object> selectByExampleWithPage(Order order, Pageable pageable, Map<String,Date> mapDate, Map<String,List<Integer>> mapList, boolean admin) ;
}